Integrand size = 41, antiderivative size = 201 \[ \int \frac {\cos ^2(c+d x) \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right )}{(a+a \sec (c+d x))^3} \, dx=\frac {(13 A-6 B+2 C) x}{2 a^3}-\frac {2 (76 A-36 B+11 C) \sin (c+d x)}{15 a^3 d}+\frac {(13 A-6 B+2 C) \cos (c+d x) \sin (c+d x)}{2 a^3 d}-\frac {(A-B+C) \cos (c+d x) \sin (c+d x)}{5 d (a+a \sec (c+d x))^3}-\frac {(11 A-6 B+C) \cos (c+d x) \sin (c+d x)}{15 a d (a+a \sec (c+d x))^2}-\frac {(76 A-36 B+11 C) \cos (c+d x) \sin (c+d x)}{15 d \left (a^3+a^3 \sec (c+d x)\right )} \]
1/2*(13*A-6*B+2*C)*x/a^3-2/15*(76*A-36*B+11*C)*sin(d*x+c)/a^3/d+1/2*(13*A- 6*B+2*C)*cos(d*x+c)*sin(d*x+c)/a^3/d-1/5*(A-B+C)*cos(d*x+c)*sin(d*x+c)/d/( a+a*sec(d*x+c))^3-1/15*(11*A-6*B+C)*cos(d*x+c)*sin(d*x+c)/a/d/(a+a*sec(d*x +c))^2-1/15*(76*A-36*B+11*C)*cos(d*x+c)*sin(d*x+c)/d/(a^3+a^3*sec(d*x+c))
Leaf count is larger than twice the leaf count of optimal. \(557\) vs. \(2(201)=402\).
Time = 4.17 (sec) , antiderivative size = 557, normalized size of antiderivative = 2.77 \[ \int \frac {\cos ^2(c+d x) \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right )}{(a+a \sec (c+d x))^3} \, dx=\frac {\sec \left (\frac {c}{2}\right ) \sec ^5\left (\frac {1}{2} (c+d x)\right ) \left (600 (13 A-6 B+2 C) d x \cos \left (\frac {d x}{2}\right )+600 (13 A-6 B+2 C) d x \cos \left (c+\frac {d x}{2}\right )+3900 A d x \cos \left (c+\frac {3 d x}{2}\right )-1800 B d x \cos \left (c+\frac {3 d x}{2}\right )+600 C d x \cos \left (c+\frac {3 d x}{2}\right )+3900 A d x \cos \left (2 c+\frac {3 d x}{2}\right )-1800 B d x \cos \left (2 c+\frac {3 d x}{2}\right )+600 C d x \cos \left (2 c+\frac {3 d x}{2}\right )+780 A d x \cos \left (2 c+\frac {5 d x}{2}\right )-360 B d x \cos \left (2 c+\frac {5 d x}{2}\right )+120 C d x \cos \left (2 c+\frac {5 d x}{2}\right )+780 A d x \cos \left (3 c+\frac {5 d x}{2}\right )-360 B d x \cos \left (3 c+\frac {5 d x}{2}\right )+120 C d x \cos \left (3 c+\frac {5 d x}{2}\right )-12760 A \sin \left (\frac {d x}{2}\right )+7020 B \sin \left (\frac {d x}{2}\right )-2960 C \sin \left (\frac {d x}{2}\right )+7560 A \sin \left (c+\frac {d x}{2}\right )-4500 B \sin \left (c+\frac {d x}{2}\right )+2160 C \sin \left (c+\frac {d x}{2}\right )-9230 A \sin \left (c+\frac {3 d x}{2}\right )+4860 B \sin \left (c+\frac {3 d x}{2}\right )-1840 C \sin \left (c+\frac {3 d x}{2}\right )+930 A \sin \left (2 c+\frac {3 d x}{2}\right )-900 B \sin \left (2 c+\frac {3 d x}{2}\right )+720 C \sin \left (2 c+\frac {3 d x}{2}\right )-2782 A \sin \left (2 c+\frac {5 d x}{2}\right )+1452 B \sin \left (2 c+\frac {5 d x}{2}\right )-512 C \sin \left (2 c+\frac {5 d x}{2}\right )-750 A \sin \left (3 c+\frac {5 d x}{2}\right )+300 B \sin \left (3 c+\frac {5 d x}{2}\right )-105 A \sin \left (3 c+\frac {7 d x}{2}\right )+60 B \sin \left (3 c+\frac {7 d x}{2}\right )-105 A \sin \left (4 c+\frac {7 d x}{2}\right )+60 B \sin \left (4 c+\frac {7 d x}{2}\right )+15 A \sin \left (4 c+\frac {9 d x}{2}\right )+15 A \sin \left (5 c+\frac {9 d x}{2}\right )\right )}{3840 a^3 d} \]
(Sec[c/2]*Sec[(c + d*x)/2]^5*(600*(13*A - 6*B + 2*C)*d*x*Cos[(d*x)/2] + 60 0*(13*A - 6*B + 2*C)*d*x*Cos[c + (d*x)/2] + 3900*A*d*x*Cos[c + (3*d*x)/2] - 1800*B*d*x*Cos[c + (3*d*x)/2] + 600*C*d*x*Cos[c + (3*d*x)/2] + 3900*A*d* x*Cos[2*c + (3*d*x)/2] - 1800*B*d*x*Cos[2*c + (3*d*x)/2] + 600*C*d*x*Cos[2 *c + (3*d*x)/2] + 780*A*d*x*Cos[2*c + (5*d*x)/2] - 360*B*d*x*Cos[2*c + (5* d*x)/2] + 120*C*d*x*Cos[2*c + (5*d*x)/2] + 780*A*d*x*Cos[3*c + (5*d*x)/2] - 360*B*d*x*Cos[3*c + (5*d*x)/2] + 120*C*d*x*Cos[3*c + (5*d*x)/2] - 12760* A*Sin[(d*x)/2] + 7020*B*Sin[(d*x)/2] - 2960*C*Sin[(d*x)/2] + 7560*A*Sin[c + (d*x)/2] - 4500*B*Sin[c + (d*x)/2] + 2160*C*Sin[c + (d*x)/2] - 9230*A*Si n[c + (3*d*x)/2] + 4860*B*Sin[c + (3*d*x)/2] - 1840*C*Sin[c + (3*d*x)/2] + 930*A*Sin[2*c + (3*d*x)/2] - 900*B*Sin[2*c + (3*d*x)/2] + 720*C*Sin[2*c + (3*d*x)/2] - 2782*A*Sin[2*c + (5*d*x)/2] + 1452*B*Sin[2*c + (5*d*x)/2] - 512*C*Sin[2*c + (5*d*x)/2] - 750*A*Sin[3*c + (5*d*x)/2] + 300*B*Sin[3*c + (5*d*x)/2] - 105*A*Sin[3*c + (7*d*x)/2] + 60*B*Sin[3*c + (7*d*x)/2] - 105* A*Sin[4*c + (7*d*x)/2] + 60*B*Sin[4*c + (7*d*x)/2] + 15*A*Sin[4*c + (9*d*x )/2] + 15*A*Sin[5*c + (9*d*x)/2]))/(3840*a^3*d)
Time = 1.22 (sec) , antiderivative size = 205, normalized size of antiderivative = 1.02, number of steps used = 12, number of rules used = 12, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.293, Rules used = {3042, 4572, 3042, 4508, 3042, 4508, 3042, 4274, 3042, 3115, 24, 3117}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \frac {\cos ^2(c+d x) \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right )}{(a \sec (c+d x)+a)^3} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {A+B \csc \left (c+d x+\frac {\pi }{2}\right )+C \csc \left (c+d x+\frac {\pi }{2}\right )^2}{\csc \left (c+d x+\frac {\pi }{2}\right )^2 \left (a \csc \left (c+d x+\frac {\pi }{2}\right )+a\right )^3}dx\) |
\(\Big \downarrow \) 4572 |
\(\displaystyle \frac {\int \frac {\cos ^2(c+d x) (a (7 A-2 B+2 C)-a (4 A-4 B-C) \sec (c+d x))}{(\sec (c+d x) a+a)^2}dx}{5 a^2}-\frac {(A-B+C) \sin (c+d x) \cos (c+d x)}{5 d (a \sec (c+d x)+a)^3}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\int \frac {a (7 A-2 B+2 C)-a (4 A-4 B-C) \csc \left (c+d x+\frac {\pi }{2}\right )}{\csc \left (c+d x+\frac {\pi }{2}\right )^2 \left (\csc \left (c+d x+\frac {\pi }{2}\right ) a+a\right )^2}dx}{5 a^2}-\frac {(A-B+C) \sin (c+d x) \cos (c+d x)}{5 d (a \sec (c+d x)+a)^3}\) |
\(\Big \downarrow \) 4508 |
\(\displaystyle \frac {\frac {\int \frac {\cos ^2(c+d x) \left (a^2 (43 A-18 B+8 C)-3 a^2 (11 A-6 B+C) \sec (c+d x)\right )}{\sec (c+d x) a+a}dx}{3 a^2}-\frac {a (11 A-6 B+C) \sin (c+d x) \cos (c+d x)}{3 d (a \sec (c+d x)+a)^2}}{5 a^2}-\frac {(A-B+C) \sin (c+d x) \cos (c+d x)}{5 d (a \sec (c+d x)+a)^3}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\frac {\int \frac {a^2 (43 A-18 B+8 C)-3 a^2 (11 A-6 B+C) \csc \left (c+d x+\frac {\pi }{2}\right )}{\csc \left (c+d x+\frac {\pi }{2}\right )^2 \left (\csc \left (c+d x+\frac {\pi }{2}\right ) a+a\right )}dx}{3 a^2}-\frac {a (11 A-6 B+C) \sin (c+d x) \cos (c+d x)}{3 d (a \sec (c+d x)+a)^2}}{5 a^2}-\frac {(A-B+C) \sin (c+d x) \cos (c+d x)}{5 d (a \sec (c+d x)+a)^3}\) |
\(\Big \downarrow \) 4508 |
\(\displaystyle \frac {\frac {\frac {\int \cos ^2(c+d x) \left (15 a^3 (13 A-6 B+2 C)-2 a^3 (76 A-36 B+11 C) \sec (c+d x)\right )dx}{a^2}-\frac {a^2 (76 A-36 B+11 C) \sin (c+d x) \cos (c+d x)}{d (a \sec (c+d x)+a)}}{3 a^2}-\frac {a (11 A-6 B+C) \sin (c+d x) \cos (c+d x)}{3 d (a \sec (c+d x)+a)^2}}{5 a^2}-\frac {(A-B+C) \sin (c+d x) \cos (c+d x)}{5 d (a \sec (c+d x)+a)^3}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\frac {\frac {\int \frac {15 a^3 (13 A-6 B+2 C)-2 a^3 (76 A-36 B+11 C) \csc \left (c+d x+\frac {\pi }{2}\right )}{\csc \left (c+d x+\frac {\pi }{2}\right )^2}dx}{a^2}-\frac {a^2 (76 A-36 B+11 C) \sin (c+d x) \cos (c+d x)}{d (a \sec (c+d x)+a)}}{3 a^2}-\frac {a (11 A-6 B+C) \sin (c+d x) \cos (c+d x)}{3 d (a \sec (c+d x)+a)^2}}{5 a^2}-\frac {(A-B+C) \sin (c+d x) \cos (c+d x)}{5 d (a \sec (c+d x)+a)^3}\) |
\(\Big \downarrow \) 4274 |
\(\displaystyle \frac {\frac {\frac {15 a^3 (13 A-6 B+2 C) \int \cos ^2(c+d x)dx-2 a^3 (76 A-36 B+11 C) \int \cos (c+d x)dx}{a^2}-\frac {a^2 (76 A-36 B+11 C) \sin (c+d x) \cos (c+d x)}{d (a \sec (c+d x)+a)}}{3 a^2}-\frac {a (11 A-6 B+C) \sin (c+d x) \cos (c+d x)}{3 d (a \sec (c+d x)+a)^2}}{5 a^2}-\frac {(A-B+C) \sin (c+d x) \cos (c+d x)}{5 d (a \sec (c+d x)+a)^3}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\frac {\frac {15 a^3 (13 A-6 B+2 C) \int \sin \left (c+d x+\frac {\pi }{2}\right )^2dx-2 a^3 (76 A-36 B+11 C) \int \sin \left (c+d x+\frac {\pi }{2}\right )dx}{a^2}-\frac {a^2 (76 A-36 B+11 C) \sin (c+d x) \cos (c+d x)}{d (a \sec (c+d x)+a)}}{3 a^2}-\frac {a (11 A-6 B+C) \sin (c+d x) \cos (c+d x)}{3 d (a \sec (c+d x)+a)^2}}{5 a^2}-\frac {(A-B+C) \sin (c+d x) \cos (c+d x)}{5 d (a \sec (c+d x)+a)^3}\) |
\(\Big \downarrow \) 3115 |
\(\displaystyle \frac {\frac {\frac {15 a^3 (13 A-6 B+2 C) \left (\frac {\int 1dx}{2}+\frac {\sin (c+d x) \cos (c+d x)}{2 d}\right )-2 a^3 (76 A-36 B+11 C) \int \sin \left (c+d x+\frac {\pi }{2}\right )dx}{a^2}-\frac {a^2 (76 A-36 B+11 C) \sin (c+d x) \cos (c+d x)}{d (a \sec (c+d x)+a)}}{3 a^2}-\frac {a (11 A-6 B+C) \sin (c+d x) \cos (c+d x)}{3 d (a \sec (c+d x)+a)^2}}{5 a^2}-\frac {(A-B+C) \sin (c+d x) \cos (c+d x)}{5 d (a \sec (c+d x)+a)^3}\) |
\(\Big \downarrow \) 24 |
\(\displaystyle \frac {\frac {\frac {15 a^3 (13 A-6 B+2 C) \left (\frac {\sin (c+d x) \cos (c+d x)}{2 d}+\frac {x}{2}\right )-2 a^3 (76 A-36 B+11 C) \int \sin \left (c+d x+\frac {\pi }{2}\right )dx}{a^2}-\frac {a^2 (76 A-36 B+11 C) \sin (c+d x) \cos (c+d x)}{d (a \sec (c+d x)+a)}}{3 a^2}-\frac {a (11 A-6 B+C) \sin (c+d x) \cos (c+d x)}{3 d (a \sec (c+d x)+a)^2}}{5 a^2}-\frac {(A-B+C) \sin (c+d x) \cos (c+d x)}{5 d (a \sec (c+d x)+a)^3}\) |
\(\Big \downarrow \) 3117 |
\(\displaystyle \frac {\frac {\frac {15 a^3 (13 A-6 B+2 C) \left (\frac {\sin (c+d x) \cos (c+d x)}{2 d}+\frac {x}{2}\right )-\frac {2 a^3 (76 A-36 B+11 C) \sin (c+d x)}{d}}{a^2}-\frac {a^2 (76 A-36 B+11 C) \sin (c+d x) \cos (c+d x)}{d (a \sec (c+d x)+a)}}{3 a^2}-\frac {a (11 A-6 B+C) \sin (c+d x) \cos (c+d x)}{3 d (a \sec (c+d x)+a)^2}}{5 a^2}-\frac {(A-B+C) \sin (c+d x) \cos (c+d x)}{5 d (a \sec (c+d x)+a)^3}\) |
-1/5*((A - B + C)*Cos[c + d*x]*Sin[c + d*x])/(d*(a + a*Sec[c + d*x])^3) + (-1/3*(a*(11*A - 6*B + C)*Cos[c + d*x]*Sin[c + d*x])/(d*(a + a*Sec[c + d*x ])^2) + (-((a^2*(76*A - 36*B + 11*C)*Cos[c + d*x]*Sin[c + d*x])/(d*(a + a* Sec[c + d*x]))) + ((-2*a^3*(76*A - 36*B + 11*C)*Sin[c + d*x])/d + 15*a^3*( 13*A - 6*B + 2*C)*(x/2 + (Cos[c + d*x]*Sin[c + d*x])/(2*d)))/a^2)/(3*a^2)) /(5*a^2)
3.5.72.3.1 Defintions of rubi rules used
Int[((b_.)*sin[(c_.) + (d_.)*(x_)])^(n_), x_Symbol] :> Simp[(-b)*Cos[c + d* x]*((b*Sin[c + d*x])^(n - 1)/(d*n)), x] + Simp[b^2*((n - 1)/n) Int[(b*Sin [c + d*x])^(n - 2), x], x] /; FreeQ[{b, c, d}, x] && GtQ[n, 1] && IntegerQ[ 2*n]
Int[sin[Pi/2 + (c_.) + (d_.)*(x_)], x_Symbol] :> Simp[Sin[c + d*x]/d, x] /; FreeQ[{c, d}, x]
Int[(csc[(e_.) + (f_.)*(x_)]*(d_.))^(n_.)*(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_)), x_Symbol] :> Simp[a Int[(d*Csc[e + f*x])^n, x], x] + Simp[b/d In t[(d*Csc[e + f*x])^(n + 1), x], x] /; FreeQ[{a, b, d, e, f, n}, x]
Int[(csc[(e_.) + (f_.)*(x_)]*(d_.))^(n_)*(csc[(e_.) + (f_.)*(x_)]*(b_.) + ( a_))^(m_)*(csc[(e_.) + (f_.)*(x_)]*(B_.) + (A_)), x_Symbol] :> Simp[(-(A*b - a*B))*Cot[e + f*x]*(a + b*Csc[e + f*x])^m*((d*Csc[e + f*x])^n/(b*f*(2*m + 1))), x] - Simp[1/(a^2*(2*m + 1)) Int[(a + b*Csc[e + f*x])^(m + 1)*(d*Cs c[e + f*x])^n*Simp[b*B*n - a*A*(2*m + n + 1) + (A*b - a*B)*(m + n + 1)*Csc[ e + f*x], x], x], x] /; FreeQ[{a, b, d, e, f, A, B, n}, x] && NeQ[A*b - a*B , 0] && EqQ[a^2 - b^2, 0] && LtQ[m, -2^(-1)] && !GtQ[n, 0]
Int[((A_.) + csc[(e_.) + (f_.)*(x_)]*(B_.) + csc[(e_.) + (f_.)*(x_)]^2*(C_. ))*(csc[(e_.) + (f_.)*(x_)]*(d_.))^(n_)*(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a _))^(m_), x_Symbol] :> Simp[(-(a*A - b*B + a*C))*Cot[e + f*x]*(a + b*Csc[e + f*x])^m*((d*Csc[e + f*x])^n/(a*f*(2*m + 1))), x] - Simp[1/(a*b*(2*m + 1)) Int[(a + b*Csc[e + f*x])^(m + 1)*(d*Csc[e + f*x])^n*Simp[a*B*n - b*C*n - A*b*(2*m + n + 1) - (b*B*(m + n + 1) - a*(A*(m + n + 1) - C*(m - n)))*Csc[ e + f*x], x], x], x] /; FreeQ[{a, b, d, e, f, A, B, C, n}, x] && EqQ[a^2 - b^2, 0] && LtQ[m, -2^(-1)]
Time = 0.30 (sec) , antiderivative size = 118, normalized size of antiderivative = 0.59
method | result | size |
parallelrisch | \(\frac {-90 \left (\left (\frac {928 A}{45}-\frac {52 B}{5}+\frac {128 C}{45}\right ) \cos \left (2 d x +2 c \right )+\left (A -\frac {2 B}{3}\right ) \cos \left (3 d x +3 c \right )-\frac {A \cos \left (4 d x +4 c \right )}{6}+\left (\frac {1001 A}{15}-\frac {162 B}{5}+\frac {136 C}{15}\right ) \cos \left (d x +c \right )+\frac {4303 A}{90}-\frac {116 B}{5}+\frac {304 C}{45}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right ) \sec \left (\frac {d x}{2}+\frac {c}{2}\right )^{4}+6240 x d \left (A -\frac {6 B}{13}+\frac {2 C}{13}\right )}{960 a^{3} d}\) | \(118\) |
derivativedivides | \(\frac {-\frac {\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{5} A}{5}+\frac {\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{5} B}{5}-\frac {\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{5} C}{5}+\frac {8 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3} A}{3}-2 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3} B +\frac {4 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3} C}{3}-31 \tan \left (\frac {d x}{2}+\frac {c}{2}\right ) A +17 \tan \left (\frac {d x}{2}+\frac {c}{2}\right ) B -7 \tan \left (\frac {d x}{2}+\frac {c}{2}\right ) C +\frac {8 \left (-\frac {7 A}{2}+B \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}+8 \left (-\frac {5 A}{2}+B \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{\left (1+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}\right )^{2}}+4 \left (13 A -6 B +2 C \right ) \arctan \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{4 d \,a^{3}}\) | \(202\) |
default | \(\frac {-\frac {\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{5} A}{5}+\frac {\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{5} B}{5}-\frac {\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{5} C}{5}+\frac {8 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3} A}{3}-2 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3} B +\frac {4 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3} C}{3}-31 \tan \left (\frac {d x}{2}+\frac {c}{2}\right ) A +17 \tan \left (\frac {d x}{2}+\frac {c}{2}\right ) B -7 \tan \left (\frac {d x}{2}+\frac {c}{2}\right ) C +\frac {8 \left (-\frac {7 A}{2}+B \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}+8 \left (-\frac {5 A}{2}+B \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{\left (1+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}\right )^{2}}+4 \left (13 A -6 B +2 C \right ) \arctan \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{4 d \,a^{3}}\) | \(202\) |
norman | \(\frac {-\frac {\left (13 A -6 B +2 C \right ) x}{2 a}-\frac {\left (A -B +C \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{11}}{20 a d}-\frac {\left (13 A -6 B +2 C \right ) x \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}}{2 a}+\frac {\left (13 A -6 B +2 C \right ) x \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{4}}{2 a}+\frac {\left (13 A -6 B +2 C \right ) x \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{6}}{2 a}+\frac {\left (37 A -27 B +17 C \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{9}}{60 a d}+\frac {\left (51 A -25 B +7 C \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{4 a d}+\frac {\left (109 A -45 B +17 C \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}}{12 a d}-\frac {\left (211 A -111 B +41 C \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{7}}{30 a d}-\frac {\left (461 A -201 B +61 C \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{5}}{30 a d}}{\left (1+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}\right )^{2} \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}-1\right ) a^{2}}\) | \(301\) |
risch | \(\frac {13 A x}{2 a^{3}}-\frac {3 B x}{a^{3}}+\frac {x C}{a^{3}}-\frac {i A \,{\mathrm e}^{2 i \left (d x +c \right )}}{8 a^{3} d}+\frac {3 i A \,{\mathrm e}^{i \left (d x +c \right )}}{2 a^{3} d}-\frac {i B \,{\mathrm e}^{i \left (d x +c \right )}}{2 a^{3} d}-\frac {3 i A \,{\mathrm e}^{-i \left (d x +c \right )}}{2 a^{3} d}+\frac {i {\mathrm e}^{-i \left (d x +c \right )} B}{2 a^{3} d}+\frac {i A \,{\mathrm e}^{-2 i \left (d x +c \right )}}{8 a^{3} d}-\frac {2 i \left (150 A \,{\mathrm e}^{4 i \left (d x +c \right )}-90 B \,{\mathrm e}^{4 i \left (d x +c \right )}+45 C \,{\mathrm e}^{4 i \left (d x +c \right )}+525 A \,{\mathrm e}^{3 i \left (d x +c \right )}-300 B \,{\mathrm e}^{3 i \left (d x +c \right )}+135 C \,{\mathrm e}^{3 i \left (d x +c \right )}+745 A \,{\mathrm e}^{2 i \left (d x +c \right )}-420 B \,{\mathrm e}^{2 i \left (d x +c \right )}+185 C \,{\mathrm e}^{2 i \left (d x +c \right )}+485 A \,{\mathrm e}^{i \left (d x +c \right )}-270 B \,{\mathrm e}^{i \left (d x +c \right )}+115 C \,{\mathrm e}^{i \left (d x +c \right )}+127 A -72 B +32 C \right )}{15 d \,a^{3} \left ({\mathrm e}^{i \left (d x +c \right )}+1\right )^{5}}\) | \(312\) |
1/960*(-90*((928/45*A-52/5*B+128/45*C)*cos(2*d*x+2*c)+(A-2/3*B)*cos(3*d*x+ 3*c)-1/6*A*cos(4*d*x+4*c)+(1001/15*A-162/5*B+136/15*C)*cos(d*x+c)+4303/90* A-116/5*B+304/45*C)*tan(1/2*d*x+1/2*c)*sec(1/2*d*x+1/2*c)^4+6240*x*d*(A-6/ 13*B+2/13*C))/a^3/d
Time = 0.26 (sec) , antiderivative size = 211, normalized size of antiderivative = 1.05 \[ \int \frac {\cos ^2(c+d x) \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right )}{(a+a \sec (c+d x))^3} \, dx=\frac {15 \, {\left (13 \, A - 6 \, B + 2 \, C\right )} d x \cos \left (d x + c\right )^{3} + 45 \, {\left (13 \, A - 6 \, B + 2 \, C\right )} d x \cos \left (d x + c\right )^{2} + 45 \, {\left (13 \, A - 6 \, B + 2 \, C\right )} d x \cos \left (d x + c\right ) + 15 \, {\left (13 \, A - 6 \, B + 2 \, C\right )} d x + {\left (15 \, A \cos \left (d x + c\right )^{4} - 15 \, {\left (3 \, A - 2 \, B\right )} \cos \left (d x + c\right )^{3} - {\left (479 \, A - 234 \, B + 64 \, C\right )} \cos \left (d x + c\right )^{2} - 3 \, {\left (239 \, A - 114 \, B + 34 \, C\right )} \cos \left (d x + c\right ) - 304 \, A + 144 \, B - 44 \, C\right )} \sin \left (d x + c\right )}{30 \, {\left (a^{3} d \cos \left (d x + c\right )^{3} + 3 \, a^{3} d \cos \left (d x + c\right )^{2} + 3 \, a^{3} d \cos \left (d x + c\right ) + a^{3} d\right )}} \]
integrate(cos(d*x+c)^2*(A+B*sec(d*x+c)+C*sec(d*x+c)^2)/(a+a*sec(d*x+c))^3, x, algorithm="fricas")
1/30*(15*(13*A - 6*B + 2*C)*d*x*cos(d*x + c)^3 + 45*(13*A - 6*B + 2*C)*d*x *cos(d*x + c)^2 + 45*(13*A - 6*B + 2*C)*d*x*cos(d*x + c) + 15*(13*A - 6*B + 2*C)*d*x + (15*A*cos(d*x + c)^4 - 15*(3*A - 2*B)*cos(d*x + c)^3 - (479*A - 234*B + 64*C)*cos(d*x + c)^2 - 3*(239*A - 114*B + 34*C)*cos(d*x + c) - 304*A + 144*B - 44*C)*sin(d*x + c))/(a^3*d*cos(d*x + c)^3 + 3*a^3*d*cos(d* x + c)^2 + 3*a^3*d*cos(d*x + c) + a^3*d)
\[ \int \frac {\cos ^2(c+d x) \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right )}{(a+a \sec (c+d x))^3} \, dx=\frac {\int \frac {A \cos ^{2}{\left (c + d x \right )}}{\sec ^{3}{\left (c + d x \right )} + 3 \sec ^{2}{\left (c + d x \right )} + 3 \sec {\left (c + d x \right )} + 1}\, dx + \int \frac {B \cos ^{2}{\left (c + d x \right )} \sec {\left (c + d x \right )}}{\sec ^{3}{\left (c + d x \right )} + 3 \sec ^{2}{\left (c + d x \right )} + 3 \sec {\left (c + d x \right )} + 1}\, dx + \int \frac {C \cos ^{2}{\left (c + d x \right )} \sec ^{2}{\left (c + d x \right )}}{\sec ^{3}{\left (c + d x \right )} + 3 \sec ^{2}{\left (c + d x \right )} + 3 \sec {\left (c + d x \right )} + 1}\, dx}{a^{3}} \]
(Integral(A*cos(c + d*x)**2/(sec(c + d*x)**3 + 3*sec(c + d*x)**2 + 3*sec(c + d*x) + 1), x) + Integral(B*cos(c + d*x)**2*sec(c + d*x)/(sec(c + d*x)** 3 + 3*sec(c + d*x)**2 + 3*sec(c + d*x) + 1), x) + Integral(C*cos(c + d*x)* *2*sec(c + d*x)**2/(sec(c + d*x)**3 + 3*sec(c + d*x)**2 + 3*sec(c + d*x) + 1), x))/a**3
Leaf count of result is larger than twice the leaf count of optimal. 411 vs. \(2 (189) = 378\).
Time = 0.32 (sec) , antiderivative size = 411, normalized size of antiderivative = 2.04 \[ \int \frac {\cos ^2(c+d x) \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right )}{(a+a \sec (c+d x))^3} \, dx=-\frac {A {\left (\frac {60 \, {\left (\frac {5 \, \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} + \frac {7 \, \sin \left (d x + c\right )^{3}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{3}}\right )}}{a^{3} + \frac {2 \, a^{3} \sin \left (d x + c\right )^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}} + \frac {a^{3} \sin \left (d x + c\right )^{4}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{4}}} + \frac {\frac {465 \, \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} - \frac {40 \, \sin \left (d x + c\right )^{3}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{3}} + \frac {3 \, \sin \left (d x + c\right )^{5}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{5}}}{a^{3}} - \frac {780 \, \arctan \left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1}\right )}{a^{3}}\right )} - 3 \, B {\left (\frac {40 \, \sin \left (d x + c\right )}{{\left (a^{3} + \frac {a^{3} \sin \left (d x + c\right )^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}}\right )} {\left (\cos \left (d x + c\right ) + 1\right )}} + \frac {\frac {85 \, \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} - \frac {10 \, \sin \left (d x + c\right )^{3}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{3}} + \frac {\sin \left (d x + c\right )^{5}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{5}}}{a^{3}} - \frac {120 \, \arctan \left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1}\right )}{a^{3}}\right )} + C {\left (\frac {\frac {105 \, \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} - \frac {20 \, \sin \left (d x + c\right )^{3}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{3}} + \frac {3 \, \sin \left (d x + c\right )^{5}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{5}}}{a^{3}} - \frac {120 \, \arctan \left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1}\right )}{a^{3}}\right )}}{60 \, d} \]
integrate(cos(d*x+c)^2*(A+B*sec(d*x+c)+C*sec(d*x+c)^2)/(a+a*sec(d*x+c))^3, x, algorithm="maxima")
-1/60*(A*(60*(5*sin(d*x + c)/(cos(d*x + c) + 1) + 7*sin(d*x + c)^3/(cos(d* x + c) + 1)^3)/(a^3 + 2*a^3*sin(d*x + c)^2/(cos(d*x + c) + 1)^2 + a^3*sin( d*x + c)^4/(cos(d*x + c) + 1)^4) + (465*sin(d*x + c)/(cos(d*x + c) + 1) - 40*sin(d*x + c)^3/(cos(d*x + c) + 1)^3 + 3*sin(d*x + c)^5/(cos(d*x + c) + 1)^5)/a^3 - 780*arctan(sin(d*x + c)/(cos(d*x + c) + 1))/a^3) - 3*B*(40*sin (d*x + c)/((a^3 + a^3*sin(d*x + c)^2/(cos(d*x + c) + 1)^2)*(cos(d*x + c) + 1)) + (85*sin(d*x + c)/(cos(d*x + c) + 1) - 10*sin(d*x + c)^3/(cos(d*x + c) + 1)^3 + sin(d*x + c)^5/(cos(d*x + c) + 1)^5)/a^3 - 120*arctan(sin(d*x + c)/(cos(d*x + c) + 1))/a^3) + C*((105*sin(d*x + c)/(cos(d*x + c) + 1) - 20*sin(d*x + c)^3/(cos(d*x + c) + 1)^3 + 3*sin(d*x + c)^5/(cos(d*x + c) + 1)^5)/a^3 - 120*arctan(sin(d*x + c)/(cos(d*x + c) + 1))/a^3))/d
Time = 0.34 (sec) , antiderivative size = 252, normalized size of antiderivative = 1.25 \[ \int \frac {\cos ^2(c+d x) \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right )}{(a+a \sec (c+d x))^3} \, dx=\frac {\frac {30 \, {\left (d x + c\right )} {\left (13 \, A - 6 \, B + 2 \, C\right )}}{a^{3}} - \frac {60 \, {\left (7 \, A \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 2 \, B \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 5 \, A \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 2 \, B \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right )}}{{\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 1\right )}^{2} a^{3}} - \frac {3 \, A a^{12} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} - 3 \, B a^{12} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 3 \, C a^{12} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} - 40 \, A a^{12} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 30 \, B a^{12} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 20 \, C a^{12} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 465 \, A a^{12} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 255 \, B a^{12} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 105 \, C a^{12} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )}{a^{15}}}{60 \, d} \]
integrate(cos(d*x+c)^2*(A+B*sec(d*x+c)+C*sec(d*x+c)^2)/(a+a*sec(d*x+c))^3, x, algorithm="giac")
1/60*(30*(d*x + c)*(13*A - 6*B + 2*C)/a^3 - 60*(7*A*tan(1/2*d*x + 1/2*c)^3 - 2*B*tan(1/2*d*x + 1/2*c)^3 + 5*A*tan(1/2*d*x + 1/2*c) - 2*B*tan(1/2*d*x + 1/2*c))/((tan(1/2*d*x + 1/2*c)^2 + 1)^2*a^3) - (3*A*a^12*tan(1/2*d*x + 1/2*c)^5 - 3*B*a^12*tan(1/2*d*x + 1/2*c)^5 + 3*C*a^12*tan(1/2*d*x + 1/2*c) ^5 - 40*A*a^12*tan(1/2*d*x + 1/2*c)^3 + 30*B*a^12*tan(1/2*d*x + 1/2*c)^3 - 20*C*a^12*tan(1/2*d*x + 1/2*c)^3 + 465*A*a^12*tan(1/2*d*x + 1/2*c) - 255* B*a^12*tan(1/2*d*x + 1/2*c) + 105*C*a^12*tan(1/2*d*x + 1/2*c))/a^15)/d
Time = 16.24 (sec) , antiderivative size = 215, normalized size of antiderivative = 1.07 \[ \int \frac {\cos ^2(c+d x) \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right )}{(a+a \sec (c+d x))^3} \, dx=\frac {{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3\,\left (\frac {5\,A-3\,B+C}{12\,a^3}+\frac {A-B+C}{4\,a^3}\right )}{d}-\frac {\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\,\left (\frac {3\,\left (5\,A-3\,B+C\right )}{4\,a^3}-\frac {2\,B-10\,A+2\,C}{4\,a^3}+\frac {3\,\left (A-B+C\right )}{2\,a^3}\right )}{d}-\frac {\left (7\,A-2\,B\right )\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3+\left (5\,A-2\,B\right )\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{d\,\left (a^3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4+2\,a^3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+a^3\right )}+\frac {x\,\left (13\,A-6\,B+2\,C\right )}{2\,a^3}-\frac {{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5\,\left (A-B+C\right )}{20\,a^3\,d} \]
(tan(c/2 + (d*x)/2)^3*((5*A - 3*B + C)/(12*a^3) + (A - B + C)/(4*a^3)))/d - (tan(c/2 + (d*x)/2)*((3*(5*A - 3*B + C))/(4*a^3) - (2*B - 10*A + 2*C)/(4 *a^3) + (3*(A - B + C))/(2*a^3)))/d - (tan(c/2 + (d*x)/2)^3*(7*A - 2*B) + tan(c/2 + (d*x)/2)*(5*A - 2*B))/(d*(2*a^3*tan(c/2 + (d*x)/2)^2 + a^3*tan(c /2 + (d*x)/2)^4 + a^3)) + (x*(13*A - 6*B + 2*C))/(2*a^3) - (tan(c/2 + (d*x )/2)^5*(A - B + C))/(20*a^3*d)